#include "cardprovider.h"
#include "txtcardreader.h"
#include "dbcardreader.h"
CardProvider::CardProvider()
{

    Source src = GameSettings::Instance()->cardSource();
    if(src == testSource)
        reader = new EmptyCardReader("");
    if(src == TxtSource)
        reader = new txtcardreader("cards.txt");
    if(src == DBSource)
        reader = new dbcardreader("db_card.sqlite");

    this->cards = reader->readCards();
}

QList<Card> * CardProvider::getCards()
{
    return this->cards;
}

